<template>
  <el-pagination
    layout="prev, pager, next"
    :total="total"
    background
    v-model:currentPage="nowpage"
  />
</template>

<script>
import { getuserlen } from "network/request.js";

export default {
  data() {
    return {
      nowpage: 1,
      total: 0,
    };
  },
  watch: {
    nowpage() {
      this.$emit("changepage", this.nowpage);
    },
  },
  created() {
    getuserlen().then(({ data: res }) => {
      this.total = (res.length / 5) * 10;
    });
  },
};
</script>

<style>
</style>